<!--#begin grp_maintree -->
<script type="text/javascript" src="{ babInstallPath }scripts/ul_tree.js"></script>
<form method="post" action="{ babPhpSelf }" name="listform">
<input type="hidden" name="tg" value="{ tgval }" />
<input type="hidden" name="idx" value="{ idxval }" />
<!--#in getNextField -->
<input type="hidden" name="{ field[0] }" value="{ field[1] }" />
<!--#endin getNextField -->

<div id="bab_groups_tree" class="bab_tree BabLoginCadreBackground"  style="padding: 1px">
	<p class="BabSiteAdminTitleFontBackground">
	<a href="javascript:tree.expand();" class="expand">{ t_expand_all }</a> 
	<a href="javascript:tree.collapse();" class="collapse">{ t_collapse_all }</a>
	<a href="#" onclick="tree.expandChecked(); return false;" class="expandchecked">{ t_expand_checked }</a>
	</p>
	<div class="tree"  style="position: relative">
	<ul>
	<li id="bab_ovgroup_{ arr[id] }">
		<div>
			<!--#if delegat -->
			<img src="{ babSkinPath }images/Puces/folder_group_d.gif" alt="{ t_group }" />
			<!--#else delegat -->
			<img src="{ babSkinPath }images/Puces/folder_group.gif" alt="{ t_group }" />
			<!--#endif delegat -->
			<label for="bab_group_chk_{ arr[id] }">{ arr[name] }</label>
			<span class="right_elements">
				<input type="checkbox" id="bab_group_chk_{ arr[id] }" name="mgroups[]" value="{ arr[id] }" <!--#if option[checked] --> checked="checked" <!--#endif option[checked] --> <!--#if option[disabled] --> disabled="disabled" <!--#endif option[disabled] --> />
			</span>
		</div>
		{ tpl_tree }
		</li>
	</ul>
	<br />
	</div>
</div>
<div align="center">
	<input type="submit" value="{ t_record }" /> 
</div>
</form>

<script type="text/javascript">
var tree = new bab_ul_tree('bab_groups_tree');
tree.processList();
<!--#if expand_checked -->
tree.expandChecked();
<!--#else expand_checked -->
tree.expandToItem('bab_ovgroup_{ id_expand_to }');
<!--#endif expand_checked -->
</script>

<a name="bab_groups_tree_end"></a>
<!--#end grp_maintree -->


<!--#begin grp_childs -->
	<ul>
		<!--#in getnextgroup -->
		<li id="bab_ovgroup_{ arr[id] }" title="{ arr[description] }">
			<div>
				<!--#if delegat -->
					<!--#if arr[nb_set] -->
					<img src="{ babSkinPath }images/Puces/folder_group_set_d.gif" alt="{ t_group_set_d }" />
					<!--#else arr[nb_set] -->
					<img src="{ babSkinPath }images/Puces/folder_group_d.gif" alt="{ t_group_d }" />
					<!--#endif arr[nb_set] -->
				<!--#else delegat -->
					<!--#if arr[nb_set] -->
					<img src="{ babSkinPath }images/Puces/folder_group_set.gif" alt="{ t_group_set }" />
					<!--#else arr[nb_set] -->
					<img src="{ babSkinPath }images/Puces/folder_group.gif" alt="{ t_group }" />
					<!--#endif arr[nb_set] -->
				<!--#endif delegat -->
				<label for="bab_group_chk_{ arr[id] }">{ arr[name] }</label>
				<span class="right_elements">
					<input type="checkbox" id="bab_group_chk_{ arr[id] }" name="mgroups[]" value="{ arr[id] }" <!--#if option[checked] --> checked="checked" <!--#endif option[checked] --> <!--#if option[disabled] --> disabled="disabled" <!--#endif option[disabled] --> />
				</span>
			</div>
			{ subtree }
		</li>
		<!--#endin getnextgroup -->
	</ul>
<!--#end grp_childs -->